package com.auemall.service.impl;

import java.util.List;

import com.auemall.po.ex.ProductEx;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.auemall.dao.FavoriteMapper;
import com.auemall.po.Favorite;
import com.auemall.service.FavoriteService;


@Service
public class FavoriteImpl implements FavoriteService {

	@Autowired
	private FavoriteMapper favoriteMapper;
	
	@Override
	public int deleteByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return favoriteMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(Favorite record) {
		// TODO Auto-generated method stub
		return favoriteMapper.insert(record);
	}

	@Override
	public int insertSelective(Favorite record) {
		// TODO Auto-generated method stub
		return favoriteMapper.insertSelective(record);
	}

	@Override
	public Favorite selectByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return favoriteMapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKeySelective(Favorite record) {
		// TODO Auto-generated method stub
		return favoriteMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(Favorite record) {
		// TODO Auto-generated method stub
		return favoriteMapper.updateByPrimaryKey(record);
	}

	@Override
	public List<ProductEx> findAllFavorite(Integer buyid) {
		return favoriteMapper.findAllFavorite(buyid);
	}

}
